#pragma once

#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <string>
#include <clocale>
#include <algorithm>
#include <vector>

using namespace std;

int sum(int n){

	if (n == 0)
	{
		return 0;
	}
	else{
		return n + sum(n - 1);
	}
}

void triangle(ostream& outs, unsigned int m, unsigned int n){

	if (m > n){
		return;
	}
	else{
		outs << string(m, '*') << endl;
		triangle(outs, m + 1, n);
		outs << string(m, '*') << endl;
	}



}


int main(){

	setlocale(LC_ALL, "swedish");

	//cout << sum(8) << endl;

	triangle(cout, 3, 5);

	system("pause");
	return 0;
}